package ed.view.hashing;

import java.awt.Color;
import java.awt.Graphics;

public class CelulaView {	
	
	
	public CelulaView(Graphics g, int posicaoX, int posicaoY, int index, Integer valor){
		
		int largura = 50;
		int altura = 25;
		g.setColor(Color.BLACK);
		g.drawRect(posicaoX, posicaoY, largura, altura);
		String value = "";
		if(valor != null){
			value = String.valueOf(valor);
		}
		g.drawString(value, posicaoX + largura/2 - largura/5, posicaoY + altura/2 + altura/4 );
		g.drawString(String.valueOf(index), posicaoX + largura/2, posicaoY - 3);
	}

}
